package com.src.isec.data.network.repository;

import com.src.isec.data.network.api.service.UserService;
import com.src.isec.domain.entity.UserEntity;
import com.src.isec.data.network.IRepositoryManager;
import com.src.isec.domain.repository.IUserRepository;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Singleton;

import io.reactivex.Observable;

/**
 * @author liujiancheng
 * @name IsecLive
 * @class name：com.src.isec.data.network.repository
 * @class describe
 * @time 2018/3/21 14:44
 * @change
 * @chang time
 * @class describe
 */
@Singleton
public class UserRepository extends BaseRepository implements IUserRepository {

   
    @Inject
    public UserRepository(IRepositoryManager iRepositoryManager) {
        super(iRepositoryManager);
    }


    @Override
    public Observable<List<UserEntity>> getUserList(int lastIdQueried, int perPage) {

        return mRepositoryManager.obtainRetrofitService(UserService.class).getUsers
                (lastIdQueried, perPage);
    }
}
